<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">

  <ui:composition template="./headerView.xhtml">
	<ui:define name="content">
	  <h:form align="left" >	
		<h:commandLink action="#{clients.previousScreen}" value="Previous" />
		<h:outputText value="   " />
		<h:commandLink action="#{clients.nextScreen}" value="Next" />		
		<h:dataTable value="#{clients.clientsListView}" var="item" bgcolor="#F1F1F1" border="10" first="0" width="100%" frame="hsides" rules="all"  >
 			<f:facet name="header">			
  			<h:outputText align="center" value="List clients:" />		
  			</f:facet> 
 			<h:column>
   				<f:facet name="header">
   					<h:outputText value="Nif" />
   				</f:facet> 
   				<p align="right"><h:outputText value="#{item.nif}" /></p>
 			</h:column>
 			<h:column>
   				<f:facet name="header">
   					<h:outputText value="E-mail"/>
   				</f:facet> 
     			<h:outputText value="#{item.email}" />
 			</h:column>
 			<h:column>
   				<f:facet name="header">
   					<h:outputText value="Name"/>
   				</f:facet> 
     			<h:outputText value="#{item.name}" />
 			</h:column>
 			<h:column>
   				<f:facet name="header">
   					<h:outputText value="Surname"/>
   				</f:facet> 
     			<h:outputText value="#{item.surname}" />
 			</h:column>
 			<h:column>
   				<f:facet name="header">
   					<h:outputText value="Birthdate" />
   				</f:facet> 
    			<h:outputText converter="#{dateStyle}" value="#{item.birthdate}" />
 			</h:column>
 			<h:column>
   				<f:facet name="header">
   					<h:outputText value="Administrator" />
   				</f:facet> 
    			<h:outputText value="#{item.administrator}" />
 			</h:column>
 			<h:column>			
					<h:link outcome="clientDetailView" value="View Client" >
						<f:param name="nifCustomer" value="#{item.nif}" />						
					</h:link>		
 			</h:column>
 		</h:dataTable>
 		<br/><br/><br/>
		<h:commandButton value="Home" immediate="true" action="#{customershow.index}" />
 	  </h:form>		
	</ui:define>
  </ui:composition>
</html>
